// 登录
export namespace Login {
	export interface ReqLoginForm {
		userName: string
		password: string
	}
	
	interface LoginParams {
		accessToken: string
		refreshToken: string
	}
	
	export interface ResLogin {
		code: number
		data: LoginParams
	}
}

// 用户信息
interface userInfoParams {
	email: string
	id: number | string
	mobile: string
	roles: string[]
	sex: string
	userId: string
	userName: string
	userNo: string
	nickName: string
	avatar: string
	permissions: string[]
}

export interface ResUserInfo {
	code: string | number
	data: userInfoParams;
}

// 用户权限
export interface UserInfoRoles {
	roleId: number | string
	roleKey: string
	roleName: string
}

export interface ResMenuList {
	name?: string
	path: string
	hidden?: boolean
	redirect?: string
	component?: any
	menuType?: 'P' | 'M' | 'B'
	alwaysShow?: boolean
	query?: string // 路由参数
	meta?: {
		title: string
		icon: string
		noCache: boolean
		link?: string | null
		isFull?: boolean // 是否全屏
		isAffix?: boolean // 是否固定在tabs
		activeMenu?: string // 当前路由为详情页时，需要高亮的菜单
	}
	children?: ResMenuList[]
}
